<?php

/**
 *  department 部门信息表
*/
apf_require_class("Bll_BLL");
class Bll_Attendance_Department extends BLL {

    /**
     * 获取所有部门信息,按城市归类
     */
    public function get_all_department(){
        $data = $this->get_de_dao()->find(array(),'',0);
        $res = array();
        foreach($data as $val){
            if(!$val['is_del']){
                $tmp = array(
                    'department_id'=>$val['department_id'],
                    'department_name'=>$val['department_name'],
                        );
                $res[$val['city_name']][]=$tmp;
            }
        }
        return $res;
    }
    private function get_de_dao(){
        return $this->get_dao('Dao_Attendance_Department');
    }
}